package cqrtplm.dto;

import lombok.Data;

import java.math.BigInteger;
import java.util.List;

@Data
public class ImportBOMItemDTO {
    private int index;
    private BigInteger oid;
    private String level;           // 层级（如 "0", "1", "2"）
    private String code;            // 图样代号
    private String name;            // 名称
    private String count;       // 数量
    private String segment;         // 段号
    private String location;        // 装配位置
    private String manufacturing;   // 制造属性
    private Long quenceNo;
    private BigInteger usageLinkOid;
    private List<ImportBOMItemDTO> children;

    public ImportBOMItemDTO(int index, String level, String code, String name, String count, String segment,
                            String location, String manufacturing, List<ImportBOMItemDTO> children) {
        this.index = index;
        this.level = level;
        this.code = code;
        this.name = name;
        this.count = count;
        this.segment = segment;
        this.location = location;
        this.manufacturing = manufacturing;
        this.children = children;
    }

    public ImportBOMItemDTO() {
    }

    public void addChild(ImportBOMItemDTO child) {
        children.add(child);
    }
}
